//
//  TestViewController.m
//  HuaRun
//
//  Created by admin on 17/8/28.
//  Copyright © 2017年 Sunny. All rights reserved.
//

#import "TestViewController.h"
#import "SearchView.h"
#import "ImageMutLineLabelView.h"
#import "KeyValueLabel.h"

@interface TestViewController ()

@property (nonatomic, strong) SearchView * searchView;
@property (nonatomic, strong) ImageMutLineLabelView * imageMutLineLabView;
@property (nonatomic, strong) KeyValueLabel * keyValueLabel;

@end

@implementation TestViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)viewInit {
    [super viewInit];
    
//    self.searchView = [SearchView new];
//    [self.view addSubview:_searchView];
    
//    self.imageMutLineLabView = [ImageMutLineLabelView new];
//    _imageMutLineLabView.backgroundColor = [UIColor yellowColor];
//    [self.view addSubview:_imageMutLineLabView];
    
    [self.view addSubview:self.keyValueLabel];
}

- (void)layoutInit {
    [super layoutInit];
    
    weakself(ws);
//    [self.searchView mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.left.mas_equalTo(ws.view).offset(30);
//        make.right.mas_equalTo(ws.view).offset(-30);
//        make.top.mas_equalTo(ws.view).offset(100);
//    }];
 
//    [self.imageMutLineLabView mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.left.mas_equalTo(ws.view).offset(kMargin10);
//        make.right.mas_equalTo(ws.view).offset(-kMargin10);
//        make.top.mas_equalTo(ws.view).offset(100);
//    }];

    [self.keyValueLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(ws.view).offset(kMargin10);
        make.right.mas_equalTo(ws.view).offset(-kMargin10);
        make.top.mas_equalTo(ws.view).offset(100);
    }];

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
- (KeyValueLabel *)keyValueLabel {
    if (!_keyValueLabel) {
        self.keyValueLabel = [[KeyValueLabel alloc] init];
    }
    return _keyValueLabel;
}
@end
